package com.linkage.lcims.base.dao.cdma.impl;

import java.util.Map;

import com.linkage.lcims.base.dao.HibernateBaseDAOImpl;
import com.linkage.lcims.base.dao.cdma.interfaces.PublicUserDAO;
import com.linkage.lcims.base.po.cdma.CPublicUser;
import com.linkage.util.exception.DAOException;

public class PublicUserDAOImpl extends HibernateBaseDAOImpl implements
		PublicUserDAO {

	public void deleteCPublicUser(CPublicUser cPublicUser) throws DAOException {
		this.delete(cPublicUser);
	}

	public CPublicUser getCPublicUser(String username) throws DAOException {
		return (CPublicUser) this.getByID(CPublicUser.class,username);
	}

	public void saveCPublicUser(CPublicUser cPublicUser) throws DAOException {
		this.save(cPublicUser);
	}

	public void updateCPublicUser(CPublicUser cPublicUser) throws DAOException {
		this.merge(cPublicUser);
	}

	public void updateCPublicUserFileds(String username, Map<String, ?> fields)
			throws DAOException {
		super.updateField(CPublicUser.class.getName(), username, fields);
	}

}
